const express = require('express')
const { createProxyMiddleware } = require('http-proxy-middleware');
const app = express()

app.use('/ytk', express.static('build'))
// 在模拟 nginx 之类的 专门用来做代理的软件
app.use('/api', createProxyMiddleware({ target: 'https://www.ahsj.link/rambo', changeOrigin: true, pathRewrite: (path) => path.replace('/api', '/') }));

app.listen(9999)